/**
 * 
 */
package cz.cuni.mff.abacs.burglar.logics.objects.positions;

import cz.cuni.mff.abacs.burglar.logics.DataMap;
import cz.cuni.mff.abacs.burglar.logics.objects.BaseInterface;
import cz.cuni.mff.abacs.burglar.logics.objects.Room;


/**
 * 
 * 
 * @author abacs
 *
 */
public interface Position extends BaseInterface {
	
	
	/**
	 * Returns the global x coordinate of the position.
	 * 
	 * @return x coordinate of the position.
	 */
	public int getX();
	
	
	/**
	 * Returns the global y coordinate of the position.
	 * 
	 * @return y coordinate of the position.
	 */
	public int getY();
	
	
	/**
	 * 
	 * @param pos
	 */
	public void connect(BasePosition pos);
	
	
	/**
	 * 
	 * 
	 */
	public void disconnect();
	
	
	/**
	 * Returns the room where the position is situated.
	 * 
	 * @return Room object of the position.
	 */
	public Room getRoom();
	
	
	/**
	 * Returns the room where the position is situated.
	 * 
	 * @return Identifier of the Room of the position.
	 */
	public int getRoomId();
	
	
	/**
	 * Returns whether the position is in the selected room.
	 * 
	 * @return true if the position is in the selected room;
	 *         false if the position is not in the selected room.
	 */
	public boolean isInRoom(Room room);
	
	
	/**
	 * Returns whether the position is in the selected room.
	 * 
	 * @return true if the position is in the selected room;
	 *         false if the position is not in the selected room.
	 */
	public boolean isInRoom(int roomId);
	
	
	/** 
	 * Returns true if it's an active position.
	 * 
	 * @return 
	 */
	public boolean isOperablePosition();
	
	
	/**
	 * 
	 * @return
	 */
	public boolean isTrapPosition();
	
	
	// -------------------------------------------------------------------------
	
	
	/**
	 * 
	 * @return
	 */
	public Position examineFromFar();
	
	
	/**
	 * 
	 * @return
	 */
	public Position examineFromNear();
	
	
	/**
	 * 
	 * @return
	 */
	public boolean matches(Position position);
	
	
	/**
	 * 
	 * @param original 
	 */
	public void copyChangeables(Position original);
	
	
	/**
	 * 
	 * @param reference 
	 */
	public Position copy(DataMap reference);
	
	
}
